package com.xiaoxu.rental.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 *
 * @TableName sys_dept
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_dept")
@ApiModel(value = "Dept对象", description = "")
public class Dept implements Serializable {
    /**
     * 部门id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 联系电话
     */
    private String phone;

    /**
     * 部门地址
     */
    private String address;

    /**
     * 上级部门id
     */
    private Integer pid;

    /**
     * 上级部门名称
     */
    private String parentName;

    /**
     * 排序号
     */
    private Integer orderNum;

    /**
     * 是否删除
     */
    private Integer deleted;

    @TableField(exist = false)
    private List<Dept> children;


    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}
